1. Technical Field
The present invention relates to a communication apparatus and method and, more particularly, to a communication technique for fragmenting and transferring data.
2. Background Art
There are systems that employ networks compliant with the IEEE 802.3 standard and use the IP (Internet Protocol) as a communication protocol. TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), etc., are available as protocols in layers higher than the IP layer. Further, layers below the IP layer are composed of LLC (Logical Link Control: IEEE 802.2) and MAC (Media Access Control) layers and PHY (physical) layers, etc.
According IP specifications, the amount of data in one IP packet can be defined up to a maximum of 65535 octets. In general, however, in order for a finite network band to be used equitably among stations connected to a network, it is so arranged that the size of a packet transferred is limited to avoid the effects of pressure on band by specific stations.
In the IP layer, the maximum data size capable of being transferred by a single transmission frame in various networks is defined as the MTU (Maximum Transfer Unit). In general, often the MTU is set to 1492 octets in the case of Ethernet (registered trademark) at 10 Mbps (megabits per second) to 1 Gbps (gigabits per second), and to 576 octets in the case of a dial-up connection using the X.25 protocol with a telephone line. With Ethernet (registered trademark) at 1 to 10 Gbps, there are instances where a larger MTU is set to manifest the merits of broadband properties.
The MTU will now be described using the IP packet format. The defined length of the MTU corresponds to the maximum length of the IP packet in a frame (e.g. Ethernet frame). When this is output as an Ethernet (registered trademark) frame, 14 octets of a MAC header are appended to the beginning of the IP packet and four octets of an FCS (Frame Check Sequence) are appended to the tail end of the packet.
In a network system of the kind illustrated in FIG. 3, a case will be described in which a host A 301 belonging to a network A 311 transmits a packet to a host B 302 belonging to a network B 312 via a network C 313. Assume that the MTU is 1492 octets in each of the networks A 311 and B 312 and 576 octets in the network C 313. A router A 321 interconnects the network A 311 and network C 313, and a router B 322 interconnects the network B 312 and network C 313.
Since the MTUs of the networks A 311 and B 312 to which the hosts A 301 and B 302, respectively, belong are 1492 octets each, the hosts A 301 and B 302 generate IP packets of a maximum of 1492 packets. If the host A 301 sends a 1492-octet IP packet to the host B 302, therefore, then the router A 321 executes processing to fragment the IP packet. In other words, the router A 321 executes fragmentation processing in such a manner that the size of each individual IP packet that is output to the network C 313 will be 576 octets or less.
More specifically, the router A 321 fragments the IP packet from the host A 301 into three IP packets, as illustrated in FIGS. 4A to 4D, in order to sent it to the network C 313. FIG. 4A illustrates the original IP packet sent from the host A 301 to the router A 321. FIGS. 4B, 4C and 4D, on the other hand, illustrate IP packets, which are the result of fragmentation processing, sent from the router A 321. It should be noted that in order to distinguish between the original IP packet and the IP packets transmitted upon being fragmented from the original IP packet, an IP packet that has undergone fragmentation processing shall be referred to as a “fragmented IP packet” below.
The IP packet shown in FIG. 4A comprises an IP header, a UDP header and a payload. The packet length of this IP packet is 1492 octets.
The first fragmented IP packet shown in FIG. 4B also comprises an IP header, a UDP header and a payload. The packet length of this fragmented IP packet, however, is 576 octets. Further, an MF (More Fragments) flag defined within the IP header has been set to “1”. It should be noted that setting the MF flag to “1” indicates the existence of a succeeding fragmented IP packet.
An ID that is identical to an ID set in the IP header of the first fragmented IP packet illustrated in FIG. 4B is added on within the IP header of the second fragmented IP packet illustrated in FIG. 4C. The second fragmented IP packet has a packet length of 576 octets identical with that of the first fragmented IP packet. Further, the MF flag defined in the IP packet is set to “1”, and a value to the effect that an offset value is 72 (indicates 576 octets because of counted in units of 8 octets) is appended. It should be noted that the offset value indicates the position in the original IP packet of data contained in the fragmented IP packet.
Setting the MF flag to “0” in the third fragmented IP packet illustrated in FIG. 4D indicates that a succeeding fragmented IP packet does not exist. That is, “0” indicates that this fragmented IP packet is the terminus of the plurality of fragmented IP packets generated by fragmentation processing. The third fragmented IP packet has an IP datagram length of 364 octets and the offset thereof is set to 141 (indicates 1128 octets).
Since the IDs set in the IP headers of the first to third fragmented IP packets are all the same ID, it is possible to identify that the original is a packet that has been generated by fragmenting the same IP packet.
Thus, the IP packet that has been transmitted from the host A 301 is fragmented into three fragmented IP packets and sent to the router B 322 via the host B 302 by the router A 321, and the IP packet is transmitted in the fragmented state from the router B 322 to the host B 302. When the host B 302 receives the three fragmented IP packets, is reconstructs the original IP packet by referring to the ID, MF flag and offset value in each of the IP headers.
Packet fragmentation processing is not limited to the above-described case but also occurs in a case where the host (station) transmits a datagram that is large in comparison with the MTU of the network at the output destination. An example of fragmentation processing is disclosed in, e.g., the specification of Japanese Patent Application Laid-Open No. 9-204376.
However, a certain problem arises in transfer in a case where processing for fragmenting an IP packet is executed in a router according to the prior art described above. Specifically, a checksum of the overall data that has been input is described in the UDP header contained in the first fragmented IP packet. Consequently, the first fragmented IP packet cannot be transmitted unless all of the data is collected in the router. The problem which results is that as the amount of data input increases, a delay in the output of packets due to fragmentation processing lengthens.